From: Julian Sparber Date: Wed, 6 Dec 2023 19:48:43 +0000 (+0100) Subject: FdoNotifications: Don't use a fallback for no icon X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~281^2~2^2~63 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=b78cc1c62ae15398dca18401788d6779b1160352;p=gnome-shell.git FdoNotifications: Don't use a fallback for no icon There is no need to have an icon for every notification, don't add a fallback. Part-of: --- diff --git a/js/ui/notificationDaemon.js b/js/ui/notificationDaemon.js index d9eed69ba..8a7a59889 100644 --- a/js/ui/notificationDaemon.js +++ b/js/ui/notificationDaemon.js @@ -61,20 +61,6 @@ class FdoNotificationDaemon { return null; } - _fallbackIconForNotificationData(hints) { - let stockIcon; - switch (hints.urgency) { - case Urgency.LOW: - case Urgency.NORMAL: - stockIcon = 'dialog-information'; - break; - case Urgency.CRITICAL: - stockIcon = 'dialog-error'; - break; - } - return new Gio.ThemedIcon({name: stockIcon}); - } - _iconForNotificationData(icon) { if (icon) { if (icon.substr(0, 7) === 'file://') @@ -212,10 +198,7 @@ class FdoNotificationDaemon { }); } - let gicon = this._imageForNotificationData(hints); - - if (!gicon) - gicon = this._fallbackIconForNotificationData(hints); + const gicon = this._imageForNotificationData(hints); const soundFile = 'sound-file' in hints ? Gio.File.new_for_path(hints['sound-file']) : null;